<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>AddPathEllipse</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">AddPathEllipse()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>AddPathEllipse</b></font>(x.d, y.d, RadiusX.d, RadiusY.d [, StartAngle.d, EndAngle.d [, Flags]])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Add an ellipse (or a partial ellipse) to the vector drawing path. 
<br>
<br>
By default, this function ends the current figure in the path and adds the ellipse 
as an unconnected figure to the path (full ellipses are marked as closed). 
This behavior can be changed with the appropriate flags. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>x.d, y.d</i></td>
<td width="90%"> 
 
Specifies the center point for the ellipse. 

 

</td></tr>
<tr><td><i>RadiusX.d, RadiusY.d</i></td>
<td> 
 
Specifies the radius for the ellipse in the X and Y direction. 

 

</td></tr>
<tr><td><i>StartAngle.d, EndAngle.d (optional)</i></td>
<td> 
 
Specifies the angle for start and end of the circle in degrees. The angle 0 marks 
at the positive X axis. The defaults are 0 and 360 degrees respectively. 

 

</td></tr>
<tr><td><i>Flags (可选)</i></td>
<td> 
 
This can be a combination of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Path_Default</font>          : No special behavior (default value)
  <font color="#924B72">#PB_Path_Relative</font>         : The positions are relative to the last cursor position.
  <font color="#924B72">#PB_Path_Connected</font>        : The circle is connected to the existing path with a line and not automatically a closed figure.
  <font color="#924B72">#PB_Path_CounterClockwise</font> : The drawing direction between the start/end angles is counter-clockwise.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>备注</b></p><blockquote>



This function draws an ellipse shape with a defined radius at the X and Y axis of the current 
coordinate system. To draw an ellipse at any rotation, rotate the coordinate system around the 
ellipse's center point before adding the ellipse as shown in the example below. The current 
coordinate system can be preserved by using <a href="savevectorstate.html">SaveVectorState()</a> and <a href="restorevectorstate.html">RestoreVectorState()</a>. 

 

</blockquote><p><b>示例</b></p><blockquote>


<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, "VectorDrawing", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)

    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))

      <font color="#3A3966">; regular ellipse</font>
<font color="#3A3966">      AddPathEllipse</font>(100, 100, 80, 30)
      
      <font color="#3A3966">; rotated ellipse</font>
<font color="#3A3966">      SaveVectorState</font>()
<font color="#3A3966">        RotateCoordinates</font>(300, 100, 45)
<font color="#3A3966">        AddPathEllipse</font>(300, 100, 80, 30)
<font color="#3A3966">      RestoreVectorState</font>()
      
<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(255, 0, 0, 255))
<font color="#3A3966">      StrokePath</font>(10)
    
<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

<p><img src="../HelpPictures/addpathellipse.png"></p>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="movepathcursor.html">MovePathCursor()</a>, <a href="addpathline.html">AddPathLine()</a>, <a href="addpatharc.html">AddPathArc()</a>, 
<a href="addpathbox.html">AddPathBox()</a>, <a href="addpathcircle.html">AddPathCircle()</a>, <a href="addpathcurve.html">AddPathCurve()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=addpathcurve.html>AddPathCurve()</a> - <a href="index.html">VectorDrawing Index</a> - <a href="addpathline.html">AddPathLine()</a> -&gt;<br><br>

</body></html>